﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Yto.Repositories;

namespace Yto.Unitwork
{
    public static class UnitworkHelper
    {
        public static bool IsUnitworkClass(Type type)
        {
            return typeof(IBaseRepository).IsAssignableFrom(type);
        }


        public static bool IsDefindUnitwork(MemberInfo memberInfo)
        {
            return memberInfo.IsDefined(typeof(UnitworkAttribute), true);
        }
    }
}
